netscan
Cross-platform network scan library
with the aim of being lightweight and fast.
Features
- Port Scan
- TCP SYN scan
- TCP CONNECT scan
- Host Scan
- ICMP PING scan
- TCP PING scan
Usage
Add netscan
to your dependencies
[]
= "0.14.0"
Example
See Examples
Feature flags
The following feature flags can be used to enable/disable specific features.
--feature async
Enable async scanning.(Default feature)
--feature service
Enable service detection. (Experimental)
--feature os
Enable TCP/IP Stack Fingerprinting. (Experimental)
--feature full
Enable all of the above.
For more details see Examples
Supported platform
- Linux
- macOS
- Windows
Note for Windows users
To build libpnet on Windows, follow the instructions below.
Windows
- You must use a version of Rust which uses the MSVC toolchain
- You must have WinPcap or npcap installed (tested with version WinPcap 4.1.3) (If using npcap, make sure to install with the "Install Npcap in WinPcap API-compatible Mode")
- You must place
Packet.lib
from the WinPcap Developers pack in a directory namedlib
, in the root of this repository. Alternatively, you can use any of the locations listed in the%LIB%
/$Env:LIB
environment variables. For the 64 bit toolchain it is inWpdPack/Lib/x64/Packet.lib
, for the 32 bit toolchain, it is inWpdPack/Lib/Packet.lib
.
Additional Notes
This library requires the ability to create raw sockets. Execute with administrator privileges.